home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group95c.txt
/
000048_icon-group-sender _Thu Oct 12 01:01:43 1995.msg
< prev
next >
Wrap
Internet Message Format
|
1996-01-03
|
3KB
Received: by cheltenham.cs.arizona.edu; Thu, 12 Oct 1995 09:19:08 MST
From: Nick Williams <nmw@styx.ios.com>
Message-Id: <199510120501.BAA23678@styx.ios.com>
Subject: Re: Strange loadfunc related bug in iconc
To: gmt@cs.arizona.edu (Gregg Townsend)
Date: Thu, 12 Oct 1995 01:01:43 -0400 (EDT)
Cc: icon-group@cs.arizona.edu
In-Reply-To: <9510120223.AA01683@hawk.CS.Arizona.EDU> from "Gregg Townsend" at Oct 11, 95 07:23:49 pm
X-Mailer: ELM [version 2.4 PL23]
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Content-Length: 2459
Errors-To: icon-group-errors@cs.arizona.edu
> From: Nick Williams <nmw@styx.ios.com>
> ...
> I had written up a small library of routines to interface to system
> calls and functions (such as fork, getuid, etc..). Now, as I tried to
> use them once again I have run into a problem: everything works fine
> when the Icon code is interpreted, but the return values of external
> functions are screwed up when the Icon code is compiled.
> ...
> Perhaps the bug is in the code that iconc generates, which I have
> serious trouble following (it wasn't meant to be read, was it? :)
> ...
>Not really. And your speculation is probably right. Try compiling with
>"iconc -n t" and see if that fixes it. If not, add "iconc -f s" and try
>that.
This worked. Thanks. I will experiment a little further, at least I want
to determine what exactly the return values are mangled into, I bet
there's a pattern. More on this tomorrow (or the day after, or
something).
> PS: To get Icon to run under FreeBSD I had to perform two changes to the
> source code: a) change "RTLD_LAZY" in fload.r to 1 and b) include a
> copy of ecvt() in rmisc.r surrounded by ifdefs (BSD_4_4_LITE).
RTLD_LAZY should probably be a define somewhere; the name should
probably be something else as well.
>Thanks for that info. Can you tell us what would be a correct FreeBSD
>entry for ipl/packs/loadfunc/mklib.sh?
ld -Bshareable -o $LIBNAME "$@" -lc
There is going to be a problem parsing the output of uname -sr as it
returns "FreeBSD 2.0.5-RELEASE" and this changes very often for FreeBSD :)
These are the defines I use (config/i486_freebsd/define.h):
#define Standard
#define IconGcvt
#define index strchr
#define rindex strrchr
#define GetHost
#define Hz 100
#define MaxHdr 13400
#define MaxStatSize 20480
#define GenericBSD
#define BSD_4_4_LITE 1 /* This is new, for 4.4Lite specific stuff */
#define UNIX 1
#define LoadFunc
#define ExecImages
#define KeyboardFncs
#define HaveTioc
#define USE_OLD_TTY
#define AllowConst
#define SysOpt
#define CComp "gcc"
#define COpts "-O2"
I put the code for ecvt within an ifdef/endif using BSD_4_4_LITE,
thinking that ecvt() is probably missing from the other 4.4Lite
variants. I may be wrong.
The rswitch stuff I copied from the i486_linux config.
> Gregg Townsend / Computer Science Dept / Univ of Arizona / Tucson, AZ 85721
> +1 520 621 4325 gmt@CS.Arizona.EDU 110 57 16 W / 32 13 45 N / +758m
>
Thanks,
Nick